# 九九乘法表
m = 1
while m < 10:
    n = 1
    while n < m + 1:
        print("{}*{}={:<2}".format(n, m, m * n), end = " ")
        n += 1
    print("\n")
    m += 1

print("=" * 70)

m = 9
while m > 0:
    n = 1
    while n < m + 1:
        print("{}*{}={:<2}".format(n, m, m * n), end = " ")
        n += 1
    print("\n")
    m -= 1

print("=" * 70)

m = 1
while m < 10:
    l = 1
    while l < 10 - m:
        print(end = "       ")
        l += 1
    n = m
    while n > 0:
        print("{}*{}={:<2}".format(n, m, m * n), end = " ")
        n -= 1
    print("\n")
    m += 1

print("=" * 70)

m = 9
while m > 0:
    l = 1
    while l < 10 - m:
        print(end = "       ")
        l += 1
    n = m
    while n > 0:
        print("{}*{}={:<2}".format(n, m, m * n), end = " ")
        n -= 1
    print("\n")
    m -= 1


